﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace RiskMan.DataClass.AlfaDirectFolder
{
    class PaperStatuses : INotifyPropertyChanged
    {
        #region Private

        private string _status;
        private string _desctiption;
        private int _iLastUpdate;
        private int _numStatus;

        #endregion

        #region Public

        /// <summary>
        /// Код статуса торгов.
        /// </summary>
        public string Status
        {
            get { return _status; }
            set
            {
                if (_status != value)
                    _status = value;

                RaisePropertyChanged("Status");
            }
        }
        /// <summary>
        /// Описание статуса торгов.
        /// </summary>
        public string Desctiption
        {
            get { return _desctiption; }
            set
            {
                if (_desctiption != value)
                    _desctiption = value;

                RaisePropertyChanged("Desctiption");
            }
        }
        /// <summary>
        /// Временная метка последнего обновления.
        /// </summary>
        public int ILastUpdate
        {
            get { return _iLastUpdate; }
            set
            {
                if (_iLastUpdate != value)
                    _iLastUpdate = value;

                RaisePropertyChanged("ILastUpdate");
            }
        }
        /// <summary>
        /// Цифровой код статуса торгов.
        /// </summary>
        public int NumStatus
        {
            get { return _numStatus; }
            set
            {
                if (_numStatus != value)
                    _numStatus = value;

                RaisePropertyChanged("NumStatus");
            }
        }

        #endregion

        #region event PropertyChangedEventHandler

        public event PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyName)
        {
            var handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion
    }
}
